package datapool
{
	import datapool.event.EventMgr;
	import flash.text.engine.ContentElement;
	import datapool.map.MapPool;
	import datapool.model.ModelPool;
	import datapool.resource.RemoteResource;

	public class Context
	{
		private var _modelPool:ModelPool;
		private var _mapPool:MapPool;
		
		static public var _context:Context;
		
		public function Context():void
		{
			init();
		}
		
		private function init():void
		{
			_modelPool = new ModelPool();
			_mapPool   = new MapPool();
		}
		
		static public function get inistance():Context
		{
			if(!_context)
			{
				_context = new Context();
			}
			return _context;
		}
		
		public function get remoteResource():RemoteResource
		{
			return RemoteResource.getInstance();
		}
		
		public function get eventMgr():EventMgr
		{
			return EventMgr.instance;
		}
		
		public function get modelPool():ModelPool
		{
			return _modelPool;
		}
		
		public function get mapPool():MapPool
		{
			return _mapPool;
		}
	}
}
